﻿using Furion;
using Furion.DatabaseAccessor;
using Microsoft.Extensions.DependencyInjection;
using PIP.Core;
using PIP.EntityFramwork.Core;

namespace PIP.EntityFramework.Core
{
    public class Startup : AppStartup
    {
        public void AddDbContext(IServiceCollection services)
        {
            services.AddDatabaseAccessor(optioons =>
            {
                optioons.AddDbPool<YyghDbContext, YyghContextLocator>(DbProvider.SqlServer);
                optioons.AddDbPool<HISDbContext, HISContextLocator>(DbProvider.SqlServer);
            }, "PIP.Database.Migrations");
        }
    }
}
